From cbd57b78cb844bc9f4088ea79a9fa7bfa053bfca Mon Sep 17 00:00:00 2001 From: robertl Date: Mon, 12 Dec 2005 17:12:59 +0000 Subject: [PATCH] Parse address for Yahoo reader, too. --- gpsbabel/yahoo.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gpsbabel/yahoo.c b/gpsbabel/yahoo.c index bd808f8c7..095c86be9 100644 --- a/gpsbabel/yahoo.c +++ b/gpsbabel/yahoo.c @@ -33,11 +33,17 @@ arglist_t yahoo_args[] = { }; static xg_callback wpt_s, wpt_lat, wpt_lon, wpt_e; +static xg_callback wpt_addr, wpt_city, wpt_state, wpt_zip, wpt_country; static xg_tag_mapping gl_map[] = { { wpt_s, cb_start, "/ResultSet/Result" }, { wpt_lat, cb_cdata, "/ResultSet/Result/Latitude" }, { wpt_lon, cb_cdata, "/ResultSet/Result/Longitude" }, + { wpt_addr, cb_cdata, "/ResultSet/Result/Address" }, + { wpt_addr, cb_cdata, "/ResultSet/Result/City" }, + { wpt_addr, cb_cdata, "/ResultSet/Result/State" }, + { wpt_addr, cb_cdata, "/ResultSet/Result/Zip" }, + { wpt_addr, cb_cdata, "/ResultSet/Result/Country" }, { wpt_e, cb_end, "/ResultSet/Result" }, { NULL, 0, NULL} }; @@ -87,6 +93,14 @@ void wpt_lon(const char *args, const char **unused) wpt_tmp->longitude = atof(args); } +void wpt_addr(const char *args, const char **unused) +{ + if (wpt_tmp->notes) { + wpt_tmp->notes = xstrappend(wpt_tmp->notes, ", "); + } + wpt_tmp->notes = xstrappend(wpt_tmp->notes, args); +} + ff_vecs_t yahoo_vecs = { ff_type_file, { ff_cap_read }, -- 2.30.2